public class IOUtils {
	
	/**
	 * @param url		{mixin}
	 * @param os		{OutputStream}
	 */
	public static wget(url, os) {
		
		if (!(url instanceof URL)) {
			url = new URL(url.toString());
		}
		def input = url.openStream();
		IOUtils.copy(input, os);
		input.close();
	}
	
	public static copy(input, output) {
		
		output.withStream { out ->
			input.eachByte{
				out.write(it)
			}
		}
	}
}